home *** CD-ROM | disk | FTP | other *** search
/ Know Your Hockey - The Greatest Player Resource / Know Your Hockey: The Greatest Player Resource.iso / hockey / director / ssqcst.cst / 00030_Script_Medialist Setup Scripts < prev    next >
Text File  |  1998-09-28  |  5KB  |  132 lines

  1.  
  2.  
  3. -- basically the script looks for marker text member named a specific way then creates a list from the names
  4. -- of the member members next to the maker .
  5. -- these member must be moved as a group the scripts do not care what
  6.  
  7. -- the name of the castmembers are: startmarker = Player(mediatype)#   endmarker = Player(mediatype)End#  
  8. global gMediaList,gPlayerTitles,gXCast,gNumPlayers
  9. on InitMedia
  10.   initPlayerTitles
  11.   set gMediaList = [:]
  12.   -- repeat loop only for the sprite range of the player sprites
  13.   set   the itemDelimiter to ","
  14.   repeat with y = 1 to gNumPlayers
  15.     loadplayer y
  16.   end repeat
  17. end
  18.  
  19. -- loads the title sound in for each player
  20. on initPlayerTitles
  21.   set gPlayerTitles = []
  22.   set Location = (the number of member "PlayerTitle" of castlib gXCast )+1  -- the Start Maker
  23.   Set EndLocation = (the number of member "PlayerTitleEnd" of castlib gXCast)-1 -- the End Marker
  24.   repeat with x =Location to Endlocation
  25.     append gplayerTitles, the name of member x
  26.   end repeat
  27. end 
  28. -- each handler is specific for each player on the screen 
  29. -- and creates a temporary property list which in put into the master poperty list GMedia List
  30.  
  31. on loadplayer y
  32.   set player1 = [:]
  33.   set Marker1 = "PlayerCards" & y
  34.   set Marker2 = "PlayerCardsEnd" & y
  35.   set Location = (the number of member Marker1 of castlib gXCast )+1  -- the Start Maker
  36.   Set EndLocation = (the number of member Marker2 of castlib gXCast)-1 -- the End Marker
  37.   set c =[]
  38.   repeat with x =Location to Endlocation
  39.     append c, the name of member x
  40.   end repeat
  41.   addProp(player1,#card,c )
  42.   set Marker1 = "PlayerVideo" & y
  43.   set Marker2 = "PlayerVideoEnd" & y
  44.   set Location = (the number of member  marker1 of castlib gXCast)+1
  45.   Set EndLocation = (the number of member marker2 of castlib gXCast)-1
  46.   set c =[]
  47.   repeat with x =Location to Endlocation
  48.     append c, the name of member x
  49.   end repeat
  50.   addProp(player1, #video,c )
  51.   set Marker1 = "PlayerText" & y
  52.   set Marker2 = "PlayerTextEnd" & y
  53.   set Location = (the number of member marker1  of castlib gXCast)+1
  54.   Set EndLocation = (the number of member marker2 of castlib gXCast)-1
  55.   set c =[] -- holds the text graphics
  56.   
  57.   -- this script looks for  the number of sets of  text cards for the player
  58.   -- look for fields between the marker members and uses these to decide know how many
  59.   -- txt cards there are for each detail card
  60.   
  61.   set txt = []
  62.   set interrange = 0 
  63.   set a = []
  64.   set b =[]
  65.   set g = []
  66.   set d = []
  67.   set e = []
  68.   set f  = []
  69.   
  70.   repeat with x =Location to Endlocation
  71.     set test = the type of member x
  72.     case test of
  73.       #field:
  74.         set interrange=interrange+1
  75.       #bitmap:
  76.         case interrange of -- the max number of txt cards is six add additional appends to expand the range
  77.           0: append a , the name of member x   
  78.           1: append b, the name of member x   
  79.           2: append g, the name of member x   
  80.           3: append d, the name of member x     
  81.           4: append e, the name of member x     
  82.           5: append f , the name of member x     
  83.         end case
  84.     end case
  85.   end repeat
  86.   
  87.   if a <> [] then append txt, a
  88.   if b <> []  then append txt, b
  89.   if g <> []  then append txt, g
  90.   if d <> [] then append txt, d
  91.   if e <> [] then append txt, e
  92.   if f <> [] then append txt, f
  93.   
  94.   
  95.   addProp(player1, #text,txt )
  96.   
  97.   
  98.   set Marker1 = "PlayerTitle" & y
  99.   set Marker2 = "PlayerTitleEnd" & y
  100.   set Location = (the number of member marker1 of castlib gXCast)+1
  101.   Set EndLocation = (the number of member marker2 of castlib gXCast)-1
  102.   set c =[]
  103.   repeat with x =Location to Endlocation
  104.     append c, the name of member x
  105.   end repeat
  106.   addProp(player1, #title,c )
  107.   
  108.   set Marker1 = "PlayerAnn" & y
  109.   set Marker2 = "PlayerAnnEnd" & y
  110.   set Location = (the number of member  marker1 of castlib gXCast)+1
  111.   Set EndLocation = (the number of member marker2 of castlib gXCast)-1
  112.   set c =[]
  113.   repeat with x =Location to Endlocation
  114.     append c, the name of member x
  115.   end repeat
  116.   addProp(player1, #Ann,c )
  117.   
  118.   set Marker1 = "PlayerCoach" & y
  119.   set Marker2 = "PlayerCoachEnd" & y
  120.   set Location = (the number of member marker1 of castlib gXCast)+1
  121.   Set EndLocation = (the number of member marker2 of castlib gXCast)-1
  122.   set c =[]
  123.   repeat with x =Location to Endlocation
  124.     append c, the name of member x
  125.   end repeat
  126.   addProp(player1, #Coach,c )
  127.   
  128.   do " AddProp(gMediaList ,#player" & y & ",player1)"
  129. end
  130.  
  131.  
  132.